package com.alibaba.citrus.cr.mn.order.center.facade.service.impl;

import com.alibaba.citrus.cr.common.annotation.FacadeInvoker;
import com.alibaba.citrus.cr.mn.order.center.forecastorder.ForecastOrderBizDomainService;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import com.epoch.app.mnordercenter.forecastorderlinequery.service.ForecastOrderLineQueryService;
import com.epoch.app.mnordercenter.model.dto.ForecastOrderLineBizQueryRequest;
import com.epoch.app.mnordercenter.model.dto.ForecastOrderLineBizQueryResponse;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zhoubc
 * @date 2023/6/1 15:04
 */
@Primary
@Component("forecastOrderLineQueryServiceCenter")
public class ForecastOrderLineQueryServiceImpl implements ForecastOrderLineQueryService {

    @Resource
    private ForecastOrderBizDomainService forecastOrderBizDomainService;

    @Override
    @FacadeInvoker
    public Result<List<ForecastOrderLineBizQueryResponse>> pageQueryFromES(ForecastOrderLineBizQueryRequest forecastOrderLineBizQueryRequest) {
        return forecastOrderBizDomainService.pageQueryOrderLineList(forecastOrderLineBizQueryRequest);
    }
}
